package com.gitee.qdbp.jdbc.plugins.impl;

import com.alibaba.fastjson.util.TypeUtils;
import com.gitee.qdbp.able.convert.ObjectTypeConverter;

/**
 * 通过FastJson实现的类型转换类
 *
 * @author zhaohuihua
 * @version 20210308
 */
public class FastJsonTypeConverter implements ObjectTypeConverter {

    @Override
    public <T> T convert(Object value, Class<T> clazz) {
        return TypeUtils.castToJavaBean(value, clazz);
    }
}
